Find First and Last position of element in sorted array